<!--
  @author heguanghua
  @since 2020/05/11 19:49
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">
<head th:include="common/common::jscss"/>
<body>

<div class="layui-fluid"
     th:with="hasDetail=${#authPermit.checkPermit('/role/detail.action')},
     hasStaffList=${#authPermit.checkPermit('/role/staff/list.action')},
     hasStaffDetail=${#authPermit.checkPermit('/staff/detail.action')},
     hasPermitList=${#authPermit.checkPermit('/role/permit/tree.action') && isAssignAdmin},
     hasStaffCancel=${#authPermit.checkPermit('/role/staff/modify/cancel.action') && isAssignAdmin}">

    <blockquote class="layui-crumb">
        <a th:lay-href="|${SYS_MCC}/role/list.action|">角色管理</a>&nbsp;&nbsp;>&nbsp;
        <a th:lay-href="|${SYS_MCC}/role/detail.action?roleId=${obj.roleId}|" lay-text="角色信息" th:text="${obj.roleName}">角色信息</a>&nbsp;&nbsp;>&nbsp;
        授权人员
    </blockquote>

    <div class="layui-card">

        <div class="layui-tab layui-tab-brief">
            <ul class="layui-tab-title">
                <li th:if="${hasDetail}"><a th:lay-href="|${SYS_MCC}/role/detail.action?roleId=${obj.roleId}|" lay-text="角色信息">角色信息</a></li>
                <li th:if="${hasPermitList}"><a th:lay-href="|${SYS_MCC}/role/permit/tree.action?roleId=${obj.roleId}|" lay-text="权限分配">权限分配</a></li>
                <li class="layui-this"><a th:lay-href="|${SYS_MCC}/role/staff/list.action?roleId=${obj.roleId}|" lay-text="授权人员">授权人员</a></li>
                <li><a th:lay-href="|${SYS_MCC}/role/change/log/list.action?roleId=${obj.roleId}|" lay-text="操作记录">操作记录</a></li>
            </ul>
        </div>

        <form method="POST" class="layui-form" action="/role/staff/list.action">
            <div th:replace="role/staff/_query::query"></div>
        </form>

        <div class="layui-card-body">
            <div th:replace="role/staff/_table::table"></div>
            <script type="text/html" id="zmn-table-tool">
                <div class="layui-btn-container">
                    <div class="layui-btn-group">
                        <button class="layui-btn layui-btn-sm" lay-event="cancel" th:if="${hasStaffCancel}">取消授权</button>
                    </div>
                </div>
            </script>
        </div>
    </div>
</div>
</body>
</html>

<script type="text/javascript" th:inline="javascript">

    var json = {
        plat: [[${vo.plat}]],
        orgTwoId: [[${vo.orgTwoId}]],
        orgId: [[${vo.orgId}]],
        deptOneId: [[${vo.deptOneId}]],
        deptTwoId: [[${vo.deptTwoId}]],
        deptId: [[${vo.deptId}]],
        status: [[${vo.status}]],
        totalCount: [[${vo.totalCount}]],
        pageSize: [[${vo.pageSize}]],
        pageIndex: [[${vo.pageIndex}]]
    };

    layui.extend({
        role_staff_list: "role/zmn.role.staff.list"
    }).use(['index', 'role_staff_list']);
</script>
